#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
# @FileName  :users.py
# @Time      :2022/4/21 2:46 PM
# @Author    :Toliong toliong@foxmail.com
"""
from sqlalchemy import Column, Integer, String, Boolean, Date, ForeignKey
from sqlalchemy.orm import relationship

from db.base_class import Base


class User(Base):
    id = Column(Integer,primary_key=True,index=True)
    username = Column(String,unique=True,nullable=False)
    email = Column(String,nullable=False,unique=True,index=True)
    hashed_password = Column(String,nullable=False)
    is_active = Column(Boolean(),default=True)
    is_superuser = Column(Boolean(),default=False)
    jobs = relationship("Job", back_populates="owner")


if __name__ == "__main__":
    pass
